package cn.edu.sicau.databasepp.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "device_type_table", schema = "sqlexcise", catalog = "")
public class DeviceTypeTableEntity
{
    private long dTypeId;
    private String deviceType;

    @Id
    @Column(name = "d_type_id", nullable = false)
    public long getdTypeId()
    {
        return dTypeId;
    }

    public void setdTypeId(long dTypeId)
    {
        this.dTypeId = dTypeId;
    }

    @Basic
    @Column(name = "device_type", nullable = true, length = 32)
    public String getDeviceType()
    {
        return deviceType;
    }

    public void setDeviceType(String deviceType)
    {
        this.deviceType = deviceType;
    }

    @Override
    public boolean equals(Object o)
    {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DeviceTypeTableEntity that = (DeviceTypeTableEntity) o;
        return dTypeId == that.dTypeId &&
                Objects.equals(deviceType, that.deviceType);
    }

    @Override
    public int hashCode()
    {
        return Objects.hash(dTypeId, deviceType);
    }
}
